package com.baoer;

import java.util.UUID;

/**
 * @Author: YING
 * @CreateTime: 2025-06-25
 * @Description:
 * @Version: 1.0
 */


public class EmployeeIdGenerator {
    public static Integer generateFiveDigitId() {

        UUID uuid = UUID.randomUUID();
        // 获取UUID的哈希值（绝对值）
        int hash = Math.abs(uuid.hashCode());
        // 取模得到5位数（范围10000-99999）
        int fiveDigit = 10000 + (hash % 90000);
        return fiveDigit;
    }
}
